package cn.hzking.gjmall.net.interfaces;


import java.util.HashMap;
import java.util.Map;

import cn.hzking.gjmall.bean.AddressBean;
import cn.hzking.gjmall.bean.CategoryBean;
import cn.hzking.gjmall.bean.CategoryListBean;
import cn.hzking.gjmall.bean.CouponBean;
import cn.hzking.gjmall.bean.DeleteSkuBean;
import cn.hzking.gjmall.bean.GoodDetailBean;
import cn.hzking.gjmall.bean.HomeDataBean;
import cn.hzking.gjmall.bean.MyCouponBean;
import cn.hzking.gjmall.bean.MyInfoBean;
import cn.hzking.gjmall.bean.NYuanBean;
import cn.hzking.gjmall.bean.OrderBean;
import cn.hzking.gjmall.bean.OrderIdBean;
import cn.hzking.gjmall.bean.PayBean;
import cn.hzking.gjmall.bean.QgGoodListBean;
import cn.hzking.gjmall.bean.SkillBean;
import cn.hzking.gjmall.bean.SureOrderBean;
import cn.hzking.gjmall.bean.WuliuDetailBean;
import cn.hzking.gjmall.bean.WxLoginBean;
import cn.hzking.gjmall.bean.address.AddressSimpleBean;
import cn.hzking.gjmall.bean.car.entity.CarBean;
import cn.hzking.gjmall.bean.car.entity.CarSkuNumBean;
import cn.hzking.gjmall.bean.car.entity.CutOrderBean;
import cn.hzking.gjmall.bean.order.OrderDetailBean;
import cn.hzking.gjmall.bean.refund.OnlyRefundScheduleBean;
import cn.hzking.gjmall.bean.refund.OssBean;
import cn.hzking.gjmall.bean.refund.OssRandomNameBean;
import cn.hzking.gjmall.bean.refund.RefundScheduleBean;
import cn.hzking.gjmall.net.base.BaseEntity;
import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Created by Administrator on 2018/1/20.
 */

public interface ApiInterface {
    @GET("")
    Observable<BaseEntity> getBaidu(@Query("wd") String name);
    @GET("")
    Call<String> loginByToken(@Query("phone") String phone, @Query("password") String password);
    //调试接口
    @GET("api/stsTokenApi/getRefundToken.json")
    Observable<ResponseBody> test(@QueryMap HashMap<String,String> parms);
    /**正式接口**/

    //首页接口(oss)
    @GET("gj/indexJson/indexApi.json")
    Observable<HomeDataBean> getHomeData();

    //商品分类页接口
    @GET("api/category/list.json")
    Observable<CategoryBean> getCateGoryData();

    //从分类列表点击进入的商品列表接口
    @GET("api/search/list.json")
    Observable<CategoryListBean> getCateGoryList(@QueryMap Map<String,String> map);

    //商品详情接口
    @GET("api/detail/show.json")
    Observable<GoodDetailBean> getGoodDetailData(@Query("itemId") String itemId);

    //搜索接口
    @GET("api/search/list.json")
    Observable<CategoryListBean> getSearchData(@QueryMap HashMap<String,String> parms);

    //普通商品列表接口
    @GET("api/search/categoryList.json")
    Observable<CategoryListBean> getNomolListData(@QueryMap HashMap<String,String> parms);

    //购物车列表接口
    @GET("shop/ajax/Cart/cartList.json")
    Observable<CarBean> getCarData();

     //秒杀列表(oss上静态数据)
    @GET("gj/secillList/99.json")
    Observable<SkillBean> getSkillData();

    //秒杀列表(服务端数据)
    @GET("/shop/ajax/seckill/seckillList.json")
    Observable<SkillBean>  getSeriverSeckillData(@QueryMap HashMap<String,String> parms);

    //N元选列表接口
    @GET("/shop/ajax/ActDetail/actDetail.json")
    Observable<NYuanBean> getNYuanList(@Query("nsId") String nsId);

    //抢购商品列表
    @GET("/shop/ajax/search/activityList.json")
    Observable<QgGoodListBean> getQgList(@QueryMap HashMap<String,String> parms);


    //修改购物车每个商品的数量
    @GET("/shop/ajax/Cart/updateCarNumber.json")
    Observable<CarSkuNumBean> getSkuCarNumber(@QueryMap HashMap<String,String> parms);

    //删除购物车商品的接口
    @GET("/shop/ajax/Cart/del.json")
    Observable<DeleteSkuBean> deleteSku(@Query("itemSkuIds") String itemSkuIds);

    //拆分自营保税和其他支付单
    @GET("/shop/ajax/Order/comeToOrderSure.json")
    Observable<CutOrderBean> getCutOrderData(@QueryMap HashMap<String,String> parms);

    //确认订单页面数据
    @GET("/api/order/appConfirmOrder.json")
    Observable<SureOrderBean> getSureOrderData(@QueryMap HashMap<String,String> parms);
    //微信登录
    @GET("/api/userApi/wxLogin.json")
    Observable<WxLoginBean> wxLogin(@Query("code") String code);

    //获取验证码
    @GET("/api/userApi/getCode.json")
    Observable<BaseEntity> getYanZhenCode(@Query("mobile") String phoneCode);

    //绑定并登录
    @GET("/api/userApi/bindMobile.json")
    Observable<WxLoginBean> registAndLogin(@Query("mobile") String mobile,@Query("verifycode") String code);
    //登录
    @GET("/api/userApi/mobileLogin.json")
    Observable<WxLoginBean> login(@Query("mobile") String mobile,@Query("verifycode") String code);
    //记录访问日志
    @GET("/api/userApi/loginVisitLog.json")
    Observable<ResponseBody> writeData();

    //刷新接口
    @GET("/api/userApi/refreshIndex.json")
    Observable<WxLoginBean> refrsh();

    //得到默认地址
    @GET("shop/ajax/Order/getDefaultAddress.json")
    Observable<AddressBean> getAddress();

    //生成订单
    @GET("/api/order/sureOrder.json")
    Observable<OrderIdBean> getOrderId(@QueryMap HashMap<String,String> parms);

    //订单支付
    @GET("/api/order/appWxPay.json")
    Observable<PayBean> payWx(@Query("orderGroupId") String orderGroupId);

    //订单详情
    @GET("api/order/orderDetail.json")
    Observable<OrderDetailBean> orderDetails(@Query("orderId") int orderId);

    //我的中心
    @GET("shop/ajax/my/info.json")
    Observable<MyInfoBean> myInfo();

    //收货地址列表
    @GET("api/address/getAddList.json")
    Observable<AddressSimpleBean> getAddressList();

    //设置默认地址
    @GET("api/address/setDefault.json")
    Observable<BaseEntity> setDefaultaddress(@Query("addressId") int addressId);

    //删除指定地址
    @GET("api/address/delete.json")
    Observable<BaseEntity> delAddress(@Query("addressId") int addressId);

    //保存收货地址
    @GET("api/address/save.json")
    Observable<BaseEntity> saveAddrsss(@QueryMap HashMap<String,String> parms);

    //订单列表
    @GET("api/order/orderList.json")
    Observable<OrderBean> getOrderList(@QueryMap HashMap<String,String> parms);

    //确认收货
    @GET("api/order/appConfirmReceipt.json")
    Observable<BaseEntity> sureReceive(@Query("orderId") int orderId);

    //删除订单
    @GET("shop/ajax/Order/deleteOrder.json")
    Observable<BaseEntity> deleteOrder(@Query("orderId") int orderId);

    //物流详情
    @GET("shop/ajax/Order/getLogistics.json")
    Observable<WuliuDetailBean> wuliuDetail(@Query("orderId") int orderId);

    //取消订单
    @GET("api/order/appCancelOrder.json")
    Observable<BaseEntity> cancelOrder(@Query("orderId") int orderId);

    //仅退款
    @GET("shop/ajax/OrderRefund/refund.json")
    Observable<BaseEntity> refundOrder(@Query("orderId") int orderId);

    //仅退款进度
    @GET("shop/ajax/OrderRefund/getRefundOrder.json")
    Observable<OnlyRefundScheduleBean> onlyRefundSchedule(@Query("orderId") int orderId);

    //申请售后
    @GET("shop/ajax/OrderRefund/applyAfterSales.json")
    Observable<BaseEntity> applyService(@QueryMap HashMap<String,Object> parms);

    //获取售后进程
    @GET("shop/ajax/orderRefund/refundProgress.json")
    Observable<RefundScheduleBean> refundSchedule(@Query("orderRefundId") int orderRefundId);

    //获取OSS令牌
    @GET("api/stsTokenApi/getRefundToken.json")
    Observable<OssBean> getOssToken();

    //获取OSS随机文件名
    @GET("/api/file/getRandromStr.json")
    Observable<OssRandomNameBean> getRandomName(@Query("count") int count);


    //用户所有优惠券
    @GET("shop/ajax/couponDetail/myCoupon.json")
    Observable<MyCouponBean> myCoupon(@QueryMap HashMap<String,String> parms);

    //用户可用优惠券接口
    @GET("/shop/ajax/couponDetail/availableCoupon.json")
    Observable<CouponBean> getCouponList(@Query("skuIds") String skuIds,@Query("numbers") String numbers);

    //实名认证
    @GET("/api/My/updateIdCard.json")
    Observable<BaseEntity> realName(@Query("realname") String realname,@Query("idCard") String  idCard);
}
